package com.example.arouter;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;


/**
 * A simple {@link Fragment} subclass.
 */
@Route(path = "/frag/text")
public class TextFragment extends Fragment {

    public TextFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        ARouter.getInstance().inject(this); //注入
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_text, container, false);
    }
}
